Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mathigon/fermat

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mathigon/fermat

Powerful mathematics, statistics and geometry library for JavaScript.

  • 0.3.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
increased by7.5%
Maintainers
1
Weekly downloads
 
Created
Source

Fermat.ts

Fermat.ts is a powerful mathematics, statistics and geometry library for TypeScript. It contains everything from number theory to random numbers, expression parsing and linear algebra classes. It was developed for Mathigon.org, an award-winning mathematics education project.

npm npm

Features

  • Arithmetic: nearlyEquals(), toWord(), toFraction(), …
  • Combinatorics: factorial(), binomial(), permutations(), subsets()
  • Complex numbers: Complex()
  • Cryptography: caesarCipher(), vigenereCipher(), letterFrequency()
  • Geometry: Point(), Line(), Polygon(), Circle(), Angle(), as well as methods for geometric properties, projections, intersections and much more
  • Matrices: Matrix.product(), Matrix.determinant(), Matrix.inverse(), …
  • Number theory: gcd(), isPrime(), generatePrime(), goldbach(), …
  • Numeric: bisect(), integrate()
  • Random: Random.shuffle(), Random.binomial(), Random.normalPDF(), …
  • Regression: Regression.linear(), Regression.coefficient(), …
  • Statistics: mean(), variance(), linearRegression(), …
  • Vector: Vector()

Usage

First, install Fermat.ts from NPM using

npm install @mathigon/fermat

We recommend using Fermat.ts together with Rollup, using using the rollup-plugin-node-resolve plugin.

Now, simply import all functions and classes you need, using

import {Complex, gcd} from '@mathigon/fermat'

Contributing

We welcome community contributions: please file any bugs you find or send us pull requests with improvements. You can find out more on Mathigon.io.

Before submitting a pull request, you will need to sign the Mathigon Individual Contributor License Agreement.

Copyright © Mathigon (dev@mathigon.org)
Released under the MIT license

Keywords

FAQs

Package last updated on 28 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc